package com.serviceImpl;

import com.dao.ContributeDao;
import com.domain.Contribute;
import com.server.ContributeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("contributeService")
public class ContributeServiceImpl implements ContributeService {

    @Resource(name="contributeDao")
    private ContributeDao contributeDao;


    @Override
    public List showContribute(int page, int pageSize,int space_id) {
        int from=(page-1)*pageSize;
        return contributeDao.showContribute(from,pageSize,space_id);
    }

    @Override
    public int showContributeTotal(int space_id) {
        return contributeDao.showContributeTotal(space_id);
    }

    @Override
    public List showYContribute(int space_id) {
        return contributeDao.showYContribute(space_id);
    }

    @Override
    public List showUNContribute(int space_id) {
        return contributeDao.showUNContribute(space_id);
    }

    @Override
    public List showDContribute(int space_id) {
        return contributeDao.showDContribute(space_id);
    }

    @Override
    public Contribute showContributeById(Integer id,int space_id) {

        return  contributeDao.showContributeById(id,space_id);
    }

    @Override
    public Integer insertContribute(Contribute contribute) {
        return contributeDao.insertContribute(contribute);

    }

    @Override
    public Contribute findLastId() {
        return contributeDao.findLastId();
    }

    @Override
    public int deleteContributeBySpaceId(int space_id) {
        return contributeDao.deleteContributeBySpaceId(space_id);
    }


}
